import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/API/Authority/Login',
    method: 'post',
    data,
    successMsg: false, //请求成功通知，支持String & Boolean
    failMsg: true //请求失败通知，支持String & Boolean
  })
}

export function getInfo(token) {
  return request({
    url: '/user/info',
    method: 'get',
    params: { token }
  })
}

export function logout(data) {
  return request({
    url: '/API/Authority/Logout',
    method: 'post',
    data,
    successMsg: false, //请求成功通知，支持String & Boolean
    failMsg: true //请求失败通知，支持String & Boolean
  })
}

export function GetEmpowerUserIDs(params) {
  return request({
    url: 'API/Authority/GetEmpowerUserIDs',
    method: 'get',
    params: params
  })
}